<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Member extends CI_Controller {

	var $data;

	public function __construct(){
		parent::__construct();

		$this->output->enable_profiler(false);


		$this->load->model('m_account');

		if(!$this->m_account->validate_cookie()){
			$this->session->set_flashdata('error', 'Anda tidak mempunyai akses ke halaman ini');
			header('location: '.site_url());
		}else{

			$this->data['cookie'] = $this->m_account->get_cookie();
		}

	$this->load->model("m_member");

	}

	public function index(){

		$this->data['page']  = 'member';
		$this->data['title'] = 'Members';
		$this->data['member'] = $this->m_member->getAll(); 
		$this->load->view('backend/dashboard', $this->data);

	}
}